package com.gable.exhibition.dao;

import com.gable.exhibition.model.Supplier;
import com.gable.exhibition.view.SupplierView;

import java.util.List;
import java.util.Map;

public interface SupplierDao {
    int deleteByPrimaryKey(Long supplierId);

    int insert(Supplier record);

    int insertSelective(Supplier record);

    Supplier selectByPrimaryKey(Long supplierId);

    int updateByPrimaryKeySelective(Supplier record);

    int updateByPrimaryKey(Supplier record);

    /**
     * 查询供应商列表用于select选择
     * @param map
     * @Create user jacky
     * @Create date 2018/3/13
     * @return
     */
    List<Supplier> querySupplier(Map map);

    /**
     * 获取供应商总数，用于分页
     * @param supplierView
     * @Create user jacky
     * @Create date 2018/3/16
     * @return
     */
    int querySupplierCount(SupplierView supplierView);

    /**
     * 获取供应商列表
     * @param supplierView
     * @Create user jacky
     * @Create date 2018/3/16
     * @return
     */
    List<SupplierView> querySupplierList(SupplierView supplierView);

    /**
     * 检查供应商编号是否存在
     * @param supplierView
     * @Create user jacky
     * @Create date 2018/3/16
     * @return
     */
    int checkSupplierNoIsExist(SupplierView supplierView);

    /**
     * 获取供应商详情
     * @param supplierId
     * @Create user jacky
     * @Create date 2018/3/16
     * @return
     */
    SupplierView querySupplierInfo(Long supplierId);

    /**
     * 根据厂商id获取对应的供应商列表
     * @param manufacturerId
     * @Create user jacky
     * @Create date 2018/3/16
     * @return
     */
    List<SupplierView> querySupplierListByManuId(Long manufacturerId);

    /**
     * 厂商绑定维修商之间的关系初始化数据
     * @param supplierView
     * @Create user jacky
     * @Create date 2018/2/28
     * @return
     */
    List<SupplierView> bindSupplierInit(SupplierView supplierView);

    /**
     * 根据厂商ID获取厂商供应商
     * @param manufacturerId
     * @return
     */
    Supplier queryManufacturerSupplier(Long manufacturerId);
 }